package cn.jas.common.jascommon.common;

public enum ResultEnum {

   /* Success(200,"请求成功"),
    fail(500,"请求忙！请重试.");*/
    /** 正确 **/
    SUCCESS_CODE(200,"请求成功"),
    /** 参数错误 **/
    PARAM_ERROR_CODE(400,"参数错误"),
    /** 限制调用 **/
    LIMIT_ERROR_CODE(401,"限制调用"),
    /** token 过期 **/
    TOKEN_TIMEOUT_CODE(402,"token过期"),
    /** 禁止访问 **/
    NO_AUTH_CODE(403,"禁止访问"),
    /** 资源没找到 **/
    NOT_FOUND(404,"未发现资源"),
    /** 服务器错误 **/
    SERVER_ERROR_CODE(500,"服务器错误"),
    /** 服务降级中 **/
    DOWNGRADE(406,"服务降级中");

    public  Integer  code;
    public  String   msg;
    ResultEnum(Integer code,String msg){
        this.code=code;
        this.msg=msg;
    }
    public  Integer  getCode(){
        return  this.code;
    }
    public  String  getMsg(String  key){
       return  this.getMsg(key);
    }
}
